#!/bin/bash

set -o errexit

dir=$(realpath "$(dirname "$0")")

fail() {
	local test=$1
	echo "test $test failed"
	exit 1
}

$dir/affinity/run || fail "affinity"
$dir/auto-tuning/run || fail "auto-tuning"
$dir/big-data/run || fail "big-data"
$dir/cross-site/run || fail "cross-site"
$dir/demand-backup-encrypted-with-tls/run || fail "demand-backup-encrypted-with-tls"
$dir/demand-backup/run || fail "demand-backup"
$dir/demand-backup-cloud/run || fail "demand-backup-cloud"
$dir/haproxy/run || fail "haproxy"
$dir/ignore-labels-annotations/run || fail "ignore-labels-annotations"
$dir/init-deploy/run || fail "init-deploy"
$dir/limits/run || fail "limits"
$dir/monitoring-2-0/run || fail "monitoring-2-0"
$dir/monitoring-pmm3/run || fail "monitoring-pmm3"
$dir/one-pod/run || fail "one-pod"
$dir/operator-self-healing-chaos/run || fail "operator-self-healing-chaos"
$dir/pitr/run || fail "pitr"
$dir/proxy-protocol/run || fail "proxy-protocol"
$dir/proxysql-sidecar-res-limits/run || fail "proxysql-sidecar-res-limits"
$dir/recreate/run || fail "recreate"
$dir/restore-to-encrypted-cluster/run || fail "restore-to-encrypted-cluster"
$dir/scaling-proxysql/run || fail "scaling-proxysql"
$dir/scaling/run || fail "scaling"
$dir/scheduled-backup/run || fail "scheduled-backup"
$dir/security-context/run || fail "security-context"
$dir/self-healing-advanced-chaos/run || fail "self-healing-advanced-chaos"
$dir/self-healing-chaos/run || fail "self-healing-chaos"
$dir/smart-update1/run || fail "smart-update1"
$dir/smart-update2/run || fail "smart-update2"
$dir/storage/run || fail "storage"
$dir/tls-issue-cert-manager-ref/run || fail "tls-issue-cert-manager-ref"
$dir/tls-issue-cert-manager/run || fail "tls-issue-cert-manager"
$dir/tls-issue-self/run || fail "tls-issue-self"
$dir/upgrade-consistency/run || fail "upgrade-consistency"
$dir/upgrade-haproxy/run || fail "upgrade-haproxy"
$dir/upgrade-proxysql/run || fail "upgrade-proxysql"
$dir/users/run || fail "users"
$dir/validation-hook/run || fail "validation-hook"
